Scribble assignment#116
Open
lokesh-ctrl wants to merge 17 commits into
Open
Conversation
….1 AA, ~150KB bundle, auth)
- Fix API base URL bug (/bug -> /api) - Add hostId to Room/RoomSnapshot; extend RoomStatus to active|completed - Enforce name validation (trim + min 1) via Zod; return 422 with message - Case-insensitive room code lookup on join - POST /api/rooms/:code/start with host+player-count gating - Lobby auto-polls every 2s; all players auto-navigate on status=active - Host badge in participant list; Start button host-only, disabled <2 players - Client-side validation with aria-describedby for accessibility
…game screen - Add drawerId + secretWord fields to Room and RoomSnapshot models - startGame sets drawerId=hostId and secretWord=STARTER_WORDS[0] (deterministic) - toRoomSnapshot gates secretWord: only returned when viewer is the drawer - GamePage shows role badge (Drawer/Guesser), word card for drawer, Drawing/Guessing labels - GamePage polls every 2s to keep game state fresh - 4 new backend unit tests covering null init, assignment, snapshot gating, determinism
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full implementation of all four business scenarios from the Scribble lab, built incrementally with Spec Kit artifacts for each feature group:
completedon correct guess, secret word revealed to all players,ResultsPageshows correct word + full guess history + scores; host-only Restart returns everyone to the lobby with players and cumulative scores preserved and all round state cleared.Each scenario has a full Spec Kit artifact set:
spec.md,plan.md,research.md,data-model.md,contracts/api.md,quickstart.md, andtasks.mdunderspecs/00N-*/.Contributor